package com.sstock.smartstock;

import java.text.SimpleDateFormat;
import java.util.Date;

public class StockFormat {
	
	String stock_code;
	String stock_code_search;
	String stock_name;
	Date created;
	String current_price;
	String first_focus_price;
	String rise_price;
	String drop_price;
	String simulate_price;
	String simulate_num;
	String need_analyze;
	String need_alarm;
	String note;
	
	public String getStock() {
		return stock_code_search;
	}
	
	public String getStockCode() {
		return stock_code;
	}
	  
	public String getStockName() {
		return stock_name;
	}
	public Date getCreated() {
	    return created;    
	}
	  
	public String getCurrentPrice() {
	    return current_price;
	}

	public String getFirstFocusPrice() {
	    return first_focus_price;
	}
	  
	public String getRisePrice() {
	    return rise_price;
	}
	  
	public String getDropPrice() {
	    return drop_price;
	}
	
	public String getSimulatePrice() {
		return simulate_price;
	}
	
	public String getSimulateNum() {
		return simulate_num;
	}
	
	public String getNeedAnalyze() {
		return need_analyze;
	}
	
	public String getNeedAlarm() {
		return need_alarm;
	}
	
	public String getNote() {
		return note;
	}
	  
	public StockFormat(String _stock_code_search, String _stock_code, String _stock_name) {
	    this(_stock_code_search, _stock_code, _stock_name, new Date(java.lang.System.currentTimeMillis()),"0.00","0.00","0.00","0.00","0.00","0.00","F","F","");
	}
	
	public String[] getDisplay(StockFormat mstock) {
		String[] value = {mstock.stock_code, mstock.stock_name, mstock.current_price,"0.00"};
		return value;
	}

	public StockFormat(String _stock_code_search, String _stock_code, 
			String _stock_name, Date _created, String _current_price, 
			String _first_focus_price,
			String _rise_price, String _drop_price,String _simulate_price,
			String _simulate_num, String _need_analyze, String _need_alarm,
			String _note) {
		stock_code_search = _stock_code_search;
		stock_code = _stock_code;
		stock_name = _stock_name;
	    created = _created;
	    current_price = _current_price;
	    first_focus_price = _first_focus_price;
	    rise_price = _rise_price;
	    drop_price = _drop_price;
	    simulate_price = _simulate_price;
	    simulate_num = _simulate_num;
	    need_analyze = _need_analyze;
	    need_alarm = _need_alarm;
	    note = _note;
	}
	
	@Override
	public String toString() {
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
	    String dateString = sdf.format(created);  
	    return "(" + dateString +  ") " + stock_code; 
	}

}
